﻿using System;
using System.Collections.Generic;

namespace IOA.MES.DataAccess.VModel
{
    /// <summary>
    /// 包装
    /// </summary>
    public class VPack : BaseVModel
    {
        private string _workshopCode = string.Empty;
        private string _workshopName = string.Empty;
        private string _orderNo = string.Empty;
        private string _workOrderNo = string.Empty;
        private string _packBatchNo = string.Empty;
        private string _packNo = string.Empty;
        private string _machineName = string.Empty;
        private string _dutyName = string.Empty;
        private string _cabinetNo = string.Empty;
        private string _nameplateModel = string.Empty;
        private string _iVCurrentLevel = string.Empty;
        private string _qLevel = string.Empty;
        private string _componentColorCode = string.Empty;
        private string _junBoxSpecs = string.Empty;
        private string _junBoxFactory = string.Empty;
        private string _backPlanSpecs = string.Empty;
        private string _backPlanFactory = string.Empty;
        private string _aluFrameSpecs = string.Empty;
        private string _aluFrameFactory = string.Empty;
        private string _batterySpecs = string.Empty;
        private string _batteryFactory = string.Empty;
        private string _warehouseCode = string.Empty;
        private string _warehouseName = string.Empty;
        private string _areaCode = string.Empty;
        private string _areaName = string.Empty;
        private string _location = string.Empty;
        private string _innerOrderNo = string.Empty;
        private string _customerCode = string.Empty;
        private string _customerName = string.Empty;
        private string _productCode = string.Empty;
        private string _productName = string.Empty;
        private string _productSpecs = string.Empty;
        private string _powerRange = string.Empty;
        private string _junBoxCode = string.Empty;
        private string _shortFrameCode = string.Empty;
        private string _longFrameCode = string.Empty;
        private string _backPlanCode = string.Empty;
        private string _glassCode = string.Empty;
        private string _glassFactory = string.Empty;
      

        #region Public Property

      

        ///<Summary>
        /// 车间代码
        ///</Summary>
        public string WorkshopCode
        {
            get { return string.IsNullOrWhiteSpace(_workshopCode) ? string.Empty : _workshopCode; }
            set { _workshopCode = value; }
        }

        ///<Summary>
        /// 车间名称
        ///</Summary>
        public string WorkshopName
        {
            get { return string.IsNullOrWhiteSpace(_workshopName) ? string.Empty : _workshopName; }
            set { _workshopName = value; }
        }

        ///<Summary>
        /// 订单号
        ///</Summary>
        public string OrderNo
        {
            get { return string.IsNullOrWhiteSpace(_orderNo) ? string.Empty : _orderNo; }
            set { _orderNo = value; }
        }

        ///<Summary>
        /// 内部订单号
        ///</Summary>
        public string InnerOrderNo
        {
            get { return string.IsNullOrWhiteSpace(_innerOrderNo) ? string.Empty : _innerOrderNo; }
            set { _innerOrderNo = value; }
        }

        ///<Summary>
        /// 工单号
        ///</Summary>
        public string WorkOrderNo
        {
            get { return string.IsNullOrWhiteSpace(_workOrderNo) ? string.Empty : _workOrderNo; }
            set { _workOrderNo = value; }
        }

        ///<Summary>
        /// 客户代码
        ///</Summary>
        public string CustomerCode
        {
            get { return string.IsNullOrWhiteSpace(_customerCode) ? string.Empty : _customerCode; }
            set { _customerCode = value; }
        }

        ///<Summary>
        /// 客户名称
        ///</Summary>
        public string CustomerName
        {
            get { return string.IsNullOrWhiteSpace(_customerName) ? string.Empty : _customerName; }
            set { _customerName = value; }
        }

        ///<Summary>
        /// 产品料号
        ///</Summary>
        public string ProductCode
        {
            get { return string.IsNullOrWhiteSpace(_productCode) ? string.Empty : _productCode; }
            set { _productCode = value; }
        }

        ///<Summary>
        /// 产品名称
        ///</Summary>
        public string ProductName
        {
            get { return string.IsNullOrWhiteSpace(_productName) ? string.Empty : _productName; }
            set { _productName = value; }
        }

        ///<Summary>
        /// 成品物料规格
        ///</Summary>
        public string ProductSpecs
        {
            get { return string.IsNullOrWhiteSpace(_productSpecs) ? string.Empty : _productSpecs; }
            set { _productSpecs = value; }
        }

        /// <summary>
        /// 数量
        /// </summary>
        public int Quantity { get; set; }

        ///<Summary>
        /// 打包批次号
        ///</Summary>
        public string PackBatchNo
        {
            get { return string.IsNullOrWhiteSpace(_packBatchNo) ? string.Empty : _packBatchNo; }
            set { _packBatchNo = value; }
        }

        ///<Summary>
        /// 打包编号
        ///</Summary>
        public string PackNo
        {
            get { return string.IsNullOrWhiteSpace(_packNo) ? string.Empty : _packNo; }
            set { _packNo = value; }
        }

        ///<Summary>
        /// 设备ID
        ///</Summary>
        public int MachineId { get; set; }

        ///<Summary>
        /// MachineName
        ///</Summary>
        public string MachineName
        {
            get { return string.IsNullOrWhiteSpace(_machineName) ? string.Empty : _machineName; }
            set { _machineName = value; }
        }

        ///<Summary>
        /// 班次ID
        ///</Summary>
        public int DutyId { get; set; }

        ///<Summary>
        /// DutyName
        ///</Summary>
        public string DutyName
        {
            get { return string.IsNullOrWhiteSpace(_dutyName) ? string.Empty : _dutyName; }
            set { _dutyName = value; }
        }

        ///<Summary>
        /// 状态
        ///</Summary>
        public Enum.PackStatus PackStatus { get; set; }

        ///<Summary>
        /// 柜号
        ///</Summary>
        public string CabinetNo
        {
            get { return string.IsNullOrWhiteSpace(_cabinetNo) ? string.Empty : _cabinetNo; }
            set { _cabinetNo = value; }
        }

        ///<Summary>
        /// 入库检状态
        ///</Summary>
        public Enum.PackInboundInspectStatus PackInspectStatus { get; set; }

        ///<Summary>
        /// 在库状态
        ///</Summary>
        public Enum.PackStockStatus StockStatus { get; set; }

        ///<Summary>
        /// 解包时间
        ///</Summary>
        public DateTime? UnpackTime { get; set; }

        ///<Summary>
        /// NameplateModel
        ///</Summary>
        public string NameplateModel
        {
            get { return string.IsNullOrWhiteSpace(_nameplateModel) ? string.Empty : _nameplateModel; }
            set { _nameplateModel = value; }
        }

        ///<Summary>
        /// 电池片效率
        ///</Summary>
        public decimal CellEfficiency { get; set; }

        ///<Summary>
        /// IVPowerLevel
        ///</Summary>
        public decimal? IVPowerLevel { get; set; }

        /// <summary>
        /// 功率范围
        /// </summary>
        public string PowerRange
        {
            get { return string.IsNullOrWhiteSpace(_powerRange) ? string.Empty : _powerRange; }
            set { _powerRange = value; }
        }

        ///<Summary>
        /// IVCurrentLevel
        ///</Summary>
        public string IVCurrentLevel
        {
            get { return string.IsNullOrWhiteSpace(_iVCurrentLevel) ? string.Empty : _iVCurrentLevel; }
            set { _iVCurrentLevel = value; }
        }

        ///<Summary>
        /// 组件等级
        ///</Summary>
        public string QLevel
        {
            get { return string.IsNullOrWhiteSpace(_qLevel) ? string.Empty : _qLevel; }
            set { _qLevel = value; }
        }

        ///<Summary>
        /// ComponentColorCode
        ///</Summary>
        public string ComponentColor
        {
            get { return string.IsNullOrWhiteSpace(_componentColorCode) ? string.Empty : _componentColorCode; }
            set { _componentColorCode = value; }
        }

        ///<Summary>
        /// JunBoxSpecs
        ///</Summary>
        public string JunBoxSpecs
        {
            get { return string.IsNullOrWhiteSpace(_junBoxSpecs) ? string.Empty : _junBoxSpecs; }
            set { _junBoxSpecs = value; }
        }

        ///<Summary>
        /// JunBoxFactory
        ///</Summary>
        public string JunBoxFactory
        {
            get { return string.IsNullOrWhiteSpace(_junBoxFactory) ? string.Empty : _junBoxFactory; }
            set { _junBoxFactory = value; }
        }

        ///<Summary>
        /// BackPlanSpecs
        ///</Summary>
        public string BackPlanSpecs
        {
            get { return string.IsNullOrWhiteSpace(_backPlanSpecs) ? string.Empty : _backPlanSpecs; }
            set { _backPlanSpecs = value; }
        }

        ///<Summary>
        /// BackPlanFactory
        ///</Summary>
        public string BackPlanFactory
        {
            get { return string.IsNullOrWhiteSpace(_backPlanFactory) ? string.Empty : _backPlanFactory; }
            set { _backPlanFactory = value; }
        }

        ///<Summary>
        /// AluFrameSpecs
        ///</Summary>
        public string AluFrameSpecs
        {
            get { return string.IsNullOrWhiteSpace(_aluFrameSpecs) ? string.Empty : _aluFrameSpecs; }
            set { _aluFrameSpecs = value; }
        }

        ///<Summary>
        /// AluFrameFactory
        ///</Summary>
        public string AluFrameFactory
        {
            get { return string.IsNullOrWhiteSpace(_aluFrameFactory) ? string.Empty : _aluFrameFactory; }
            set { _aluFrameFactory = value; }
        }

        ///<Summary>
        /// BatterySpecs
        ///</Summary>
        public string BatterySpecs
        {
            get { return string.IsNullOrWhiteSpace(_batterySpecs) ? string.Empty : _batterySpecs; }
            set { _batterySpecs = value; }
        }

        ///<Summary>
        /// BatteryFactory
        ///</Summary>
        public string BatteryFactory
        {
            get { return string.IsNullOrWhiteSpace(_batteryFactory) ? string.Empty : _batteryFactory; }
            set { _batteryFactory = value; }
        }

        ///<Summary>
        /// 仓库代码
        ///</Summary>
        public string WarehouseCode
        {
            get { return string.IsNullOrWhiteSpace(_warehouseCode) ? string.Empty : _warehouseCode; }
            set { _warehouseCode = value; }
        }

        ///<Summary>
        /// 仓库名称
        ///</Summary>
        public string WarehouseName
        {
            get { return string.IsNullOrWhiteSpace(_warehouseName) ? string.Empty : _warehouseName; }
            set { _warehouseName = value; }
        }

        ///<Summary>
        /// 库区代码
        ///</Summary>
        public string AreaCode
        {
            get { return string.IsNullOrWhiteSpace(_areaCode) ? string.Empty : _areaCode; }
            set { _areaCode = value; }
        }

        ///<Summary>
        /// 库区名称
        ///</Summary>
        public string AreaName
        {
            get { return string.IsNullOrWhiteSpace(_areaName) ? string.Empty : _areaName; }
            set { _areaName = value; }
        }

        ///<Summary>
        /// 库位名称
        ///</Summary>
        public string Location
        {
            get { return string.IsNullOrWhiteSpace(_location) ? string.Empty : _location; }
            set { _location = value; }
        }

        ///<Summary>
        /// 接线盒料号
        ///</Summary>
        public string JunBoxCode
        {
            get { return string.IsNullOrWhiteSpace(_junBoxCode) ? string.Empty : _junBoxCode; }
            set { _junBoxCode = value; }
        }

        ///<Summary>
        /// 短边框料号
        ///</Summary>
        public string ShortFrameCode
        {
            get { return string.IsNullOrWhiteSpace(_shortFrameCode) ? string.Empty : _shortFrameCode; }
            set { _shortFrameCode = value; }
        }

        ///<Summary>
        /// 长边框料号
        ///</Summary>
        public string LongFrameCode
        {
            get { return string.IsNullOrWhiteSpace(_longFrameCode) ? string.Empty : _longFrameCode; }
            set { _longFrameCode = value; }
        }

        ///<Summary>
        /// 背板料号
        ///</Summary>
        public string BackPlanCode
        {
            get { return string.IsNullOrWhiteSpace(_backPlanCode) ? string.Empty : _backPlanCode; }
            set { _backPlanCode = value; }
        }

        ///<Summary>
        /// 玻璃料号
        ///</Summary>
        public string GlassCode
        {
            get { return string.IsNullOrWhiteSpace(_glassCode) ? string.Empty : _glassCode; }
            set { _glassCode = value; }
        }

        ///<Summary>
        /// 玻璃厂家
        ///</Summary>
        public string GlassFactory
        {
            get { return string.IsNullOrWhiteSpace(_glassFactory) ? string.Empty : _glassFactory; }
            set { _glassFactory = value; }
        }

        /// <summary>
        /// 车间内顺序
        /// </summary>
        public int PackIndex { get; set; }
        #endregion

        ///<Summary>
        /// 打包状态
        ///</Summary>
        public string CNPackStatus
        {
            get { return !System.Enum.IsDefined(typeof(Enum.PackStatus), PackStatus) ? string.Empty : EnumConvert.ToDesc(PackStatus); }
        }

        ///<Summary>
        /// 在库状态
        ///</Summary>
        public string CNStockStatus
        {
            get { return !System.Enum.IsDefined(typeof(Enum.PackStockStatus), StockStatus) ? string.Empty : EnumConvert.ToDesc(StockStatus); }
        }

        ///<Summary>
        /// 入库检状态
        ///</Summary>
        public string CNPackInspectStatus
        {
            get { return !System.Enum.IsDefined(typeof(Enum.PackInboundInspectStatus), PackInspectStatus) ? string.Empty : EnumConvert.ToDesc(PackInspectStatus); }
        }

        ///<Summary>
        /// 产品条码
        ///</Summary>
        public List<VPackProduct> Products { get; set; } = new List<VPackProduct>();

        /// <summary>
        /// 打包条件
        /// </summary>
        public VPackCondition PackCondition { get; set; }

        /// <summary>
        /// 是否已出库
        /// </summary>
        public bool Outbounded { get; set; }

        /// <summary>
        /// 是否已装车
        /// </summary>
        public bool Loaded { get; set; }
    }
}
